package cn.yunyichina.utils.log.filter;

import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.filter.Filter;
import ch.qos.logback.core.spi.FilterReply;

/**
 * Created by kevin on 2017/12/4.
 */
public class EsLogFilter extends Filter<ILoggingEvent> {
    private static final String ESLOG="[eslog]";

    @Override
    public FilterReply decide(ILoggingEvent iLoggingEvent) {
//        if (iLoggingEvent.getMessage().startsWith(ESLOG)) {
//            return FilterReply.ACCEPT;
//        }
//        else {
//            return FilterReply.DENY;
//        }

        return FilterReply.ACCEPT;
    }
}
